/* 蒙层 */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 999;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* 弹窗容器 */
.modal-container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 37.5rem; /* 750px / 20 = 37.5rem */
  height: 25.2rem; /* 504px / 20 = 25.2rem */
  background-image: url("../../../../../public/images/BG-蓝-放大.png");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  border-radius: 4px;
  z-index: 1001;
  opacity: 0;
  transition: all 0.2s ease-out;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  /* 不同类型的弹窗样式 */
  &.modal-red {
    background-image: url("../../../../../public/images/BG-红-放大.png");
  }

  &.modal-yellow {
    background-image: url("../../../../../public/images/BG-黄-放大.png");
  }

  &.modal-green {
    background-image: url("../../../../../public/images/BG-蓝-放大.png");
  }

  &.visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  &::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
  }
}

/* 弹窗头部 */
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem; /* 12px 16px / 20 = 0.6rem 0.8rem */
}

.modal-title {
  margin: 0;
  font-size: 0.8rem; /* 16px / 20 = 0.8rem */
  font-weight: 500;
}

.close-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem; /* 18px / 20 = 0.9rem */
  cursor: pointer;
  width: 1.2rem; /* 24px / 20 = 1.2rem */
  height: 1.2rem; /* 24px / 20 = 1.2rem */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s;

  &:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
  }
}

/* 弹窗内容 */
.modal-content {
  padding: 0.8rem; /* 16px / 20 = 0.8rem */
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* 点信息区域 */
.point-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.6rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.data-item {
  display: flex;
  margin-bottom: 0.6rem; /* 12px / 20 = 0.6rem */
  font-size: 0.7rem; /* 14px / 20 = 0.7rem */
  
  &:last-child {
    margin-bottom: 0;
  }
}

.label {
  flex: 0 0 4rem; /* 80px / 20 = 4rem */
  color: rgba(255, 255, 255, 0.7);
}

.value {
  flex: 1;
  font-weight: 500;
  color: #fff;
}

/* 图表容器 */
.chart-container {
  flex: 1;
  min-height: 12rem; /* 确保图表有最小高度 */
  border-radius: 4px;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.3rem;
}

/* 弹窗底部 */
.modal-footer {
  display: flex;
  justify-content: flex-end;
  padding: 0.6rem 0.8rem; /* 12px 16px / 20 = 0.6rem 0.8rem */
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}